package com.accesshollywood.grfxOrdering.core;

import com.accesshollywood.SQL.GrfxDateTime;
import com.accesshollywood.grfxOrdering.basics.BLOCK;
import com.accesshollywood.grfxOrdering.basics.Users;
import com.accesshollywood.indexables.Destination;
import com.accesshollywood.indexables.GraphicType;
import com.accesshollywood.indexables.ShowName;
import com.accesshollywood.indexables.User;
import com.accesshollywood.indexables.items.GrfxItemList;
import com.accesshollywood.indexables.items.TextIndexed;

public class CoreGrfxOrder {
	private ShowName		showName		= new ShowName();
	private TextIndexed			summary			= new TextIndexed();
	private GrfxDateTime			creationDate	= new GrfxDateTime();
	private GrfxDateTime			dueDate			= new GrfxDateTime();
	private BLOCK			block			= BLOCK.A;
	private GraphicType		graphicType		= new GraphicType();
	private User			orderedBy		= Users.unAssignedOrderer;
	private User			researcher		= Users.unAssignedResearch;
	private User			artist			= Users.unAssignedArtist;
	private User			producer		= Users.unAssignedProducer;
	private User			photoEdit		= Users.unAssignedPhotoEdit;
	private User			footage			= Users.unAssignedFootage;
	private User			legal			= Users.unAssignedLegal;
	private boolean			apprLegal		= false;
	private boolean			apprResearch	= false;
	private boolean			apprPhotoEdit	= false;
	private boolean			apprFootage		= false;
	private GrfxItemList	items			= new GrfxItemList();
	private Destination		destination		= new Destination();
	private TextIndexed			notes			= new TextIndexed();
	private boolean			complete		= false;
	private boolean			closed			= false;
	private boolean			archived		= false;
	private boolean			needsLegal		= false;
	private boolean			needsResearch	= false;
	private boolean			needsPhotoEdit	= false;
	private boolean			needsFootage	= false;

	public synchronized ShowName getShowName() {
		return showName;
	}

	public synchronized void setShowName(ShowName showName) {
		this.showName = showName;
	}

	public synchronized TextIndexed getSummary() {
		return summary;
	}

	public synchronized void setSummary(TextIndexed summary) {
		this.summary = summary;
	}

	public synchronized GrfxDateTime getCreationDate() {
		return creationDate;
	}

	public synchronized void setCreationDate(GrfxDateTime creationDate) {
		this.creationDate = creationDate;
	}

	public synchronized GrfxDateTime getDueDate() {
		return dueDate;
	}

	public synchronized void setDueDate(GrfxDateTime dueDate) {
		this.dueDate = dueDate;
	}

	public synchronized BLOCK getBlock() {
		return block;
	}

	public synchronized void setBlock(BLOCK block) {
		this.block = block;
	}

	public synchronized GraphicType getGraphicType() {
		return graphicType;
	}

	public synchronized void setGraphicType(GraphicType graphicType) {
		this.graphicType = graphicType;
	}

	public synchronized User getOrderedBy() {
		return orderedBy;
	}

	public synchronized void setOrderedBy(User orderedBy) {
		this.orderedBy = orderedBy;
	}

	public synchronized User getResearcher() {
		return researcher;
	}

	public synchronized void setResearcher(User researcher) {
		this.researcher = researcher;
	}

	public synchronized User getArtist() {
		return artist;
	}

	public synchronized void setArtist(User artist) {
		this.artist = artist;
	}

	public synchronized User getProducer() {
		return producer;
	}

	public synchronized void setProducer(User producer) {
		this.producer = producer;
	}

	public synchronized User getPhotoEdit() {
		return photoEdit;
	}

	public synchronized void setPhotoEdit(User photoEdit) {
		this.photoEdit = photoEdit;
	}

	public synchronized User getFootage() {
		return footage;
	}

	public synchronized void setFootage(User footage) {
		this.footage = footage;
	}

	public synchronized User getLegal() {
		return legal;
	}

	public synchronized void setLegal(User legal) {
		this.legal = legal;
	}

	public synchronized boolean isApprLegal() {
		return apprLegal;
	}

	public synchronized void setApprLegal(boolean apprLegal) {
		this.apprLegal = apprLegal;
	}

	public synchronized boolean isApprResearch() {
		return apprResearch;
	}

	public synchronized void setApprResearch(boolean apprResearch) {
		this.apprResearch = apprResearch;
	}

	public synchronized boolean isApprPhotoEdit() {
		return apprPhotoEdit;
	}

	public synchronized void setApprPhotoEdit(boolean apprPhotoEdit) {
		this.apprPhotoEdit = apprPhotoEdit;
	}

	public synchronized boolean isApprFootage() {
		return apprFootage;
	}

	public synchronized void setApprFootage(boolean apprFootage) {
		this.apprFootage = apprFootage;
	}

	public synchronized GrfxItemList getItems() {
		return items;
	}

	public synchronized void setItems(GrfxItemList items) {
		this.items = items;
	}

	public synchronized Destination getDestination() {
		return destination;
	}

	public synchronized void setDestination(Destination destination) {
		this.destination = destination;
	}

	public synchronized TextIndexed getNotes() {
		return notes;
	}

	public synchronized void setNotes(TextIndexed notes) {
		this.notes = notes;
	}

	public synchronized boolean isComplete() {
		return complete;
	}

	public synchronized void setComplete(boolean complete) {
		this.complete = complete;
	}

	public synchronized boolean isClosed() {
		return closed;
	}

	public synchronized void setClosed(boolean closed) {
		this.closed = closed;
	}

	public synchronized boolean isArchived() {
		return archived;
	}

	public synchronized void setArchived(boolean archived) {
		this.archived = archived;
	}

	public synchronized boolean isNeedsLegal() {
		return needsLegal;
	}

	public synchronized void setNeedsLegal(boolean needsLegal) {
		this.needsLegal = needsLegal;
	}

	public synchronized boolean isNeedsResearch() {
		return needsResearch;
	}

	public synchronized void setNeedsResearch(boolean needsResearch) {
		this.needsResearch = needsResearch;
	}

	public synchronized boolean isNeedsPhotoEdit() {
		return needsPhotoEdit;
	}

	public synchronized void setNeedsPhotoEdit(boolean needsPhotoEdit) {
		this.needsPhotoEdit = needsPhotoEdit;
	}

	public synchronized boolean isNeedsFootage() {
		return needsFootage;
	}

	public synchronized void setNeedsFootage(boolean needsFootage) {
		this.needsFootage = needsFootage;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (apprFootage ? 1231 : 1237);
		result = prime * result + (apprLegal ? 1231 : 1237);
		result = prime * result + (apprPhotoEdit ? 1231 : 1237);
		result = prime * result + (apprResearch ? 1231 : 1237);
		result = prime * result + (archived ? 1231 : 1237);
		result = prime * result + ((artist == null) ? 0 : artist.hashCode());
		result = prime * result + ((block == null) ? 0 : block.hashCode());
		result = prime * result + (closed ? 1231 : 1237);
		result = prime * result + (complete ? 1231 : 1237);
		result = prime * result + ((creationDate == null) ? 0 : creationDate.hashCode());
		result = prime * result + ((destination == null) ? 0 : destination.hashCode());
		result = prime * result + ((dueDate == null) ? 0 : dueDate.hashCode());
		result = prime * result + ((footage == null) ? 0 : footage.hashCode());
		result = prime * result + ((graphicType == null) ? 0 : graphicType.hashCode());
		result = prime * result + ((items == null) ? 0 : items.hashCode());
		result = prime * result + ((legal == null) ? 0 : legal.hashCode());
		result = prime * result + (needsFootage ? 1231 : 1237);
		result = prime * result + (needsLegal ? 1231 : 1237);
		result = prime * result + (needsPhotoEdit ? 1231 : 1237);
		result = prime * result + (needsResearch ? 1231 : 1237);
		result = prime * result + ((notes == null) ? 0 : notes.hashCode());
		result = prime * result + ((orderedBy == null) ? 0 : orderedBy.hashCode());
		result = prime * result + ((photoEdit == null) ? 0 : photoEdit.hashCode());
		result = prime * result + ((producer == null) ? 0 : producer.hashCode());
		result = prime * result + ((researcher == null) ? 0 : researcher.hashCode());
		result = prime * result + ((showName == null) ? 0 : showName.hashCode());
		result = prime * result + ((summary == null) ? 0 : summary.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CoreGrfxOrder other = (CoreGrfxOrder) obj;
		if (apprFootage != other.apprFootage)
			return false;
		if (apprLegal != other.apprLegal)
			return false;
		if (apprPhotoEdit != other.apprPhotoEdit)
			return false;
		if (apprResearch != other.apprResearch)
			return false;
		if (archived != other.archived)
			return false;
		if (artist == null) {
			if (other.artist != null)
				return false;
		} else if (!artist.equals(other.artist))
			return false;
		if (block != other.block)
			return false;
		if (closed != other.closed)
			return false;
		if (complete != other.complete)
			return false;
		if (creationDate == null) {
			if (other.creationDate != null)
				return false;
		} else if (!creationDate.equals(other.creationDate))
			return false;
		if (destination == null) {
			if (other.destination != null)
				return false;
		} else if (!destination.equals(other.destination))
			return false;
		if (dueDate == null) {
			if (other.dueDate != null)
				return false;
		} else if (!dueDate.equals(other.dueDate))
			return false;
		if (footage == null) {
			if (other.footage != null)
				return false;
		} else if (!footage.equals(other.footage))
			return false;
		if (graphicType == null) {
			if (other.graphicType != null)
				return false;
		} else if (!graphicType.equals(other.graphicType))
			return false;
		if (items == null) {
			if (other.items != null)
				return false;
		} else if (!items.equals(other.items))
			return false;
		if (legal == null) {
			if (other.legal != null)
				return false;
		} else if (!legal.equals(other.legal))
			return false;
		if (needsFootage != other.needsFootage)
			return false;
		if (needsLegal != other.needsLegal)
			return false;
		if (needsPhotoEdit != other.needsPhotoEdit)
			return false;
		if (needsResearch != other.needsResearch)
			return false;
		if (notes == null) {
			if (other.notes != null)
				return false;
		} else if (!notes.equals(other.notes))
			return false;
		if (orderedBy == null) {
			if (other.orderedBy != null)
				return false;
		} else if (!orderedBy.equals(other.orderedBy))
			return false;
		if (photoEdit == null) {
			if (other.photoEdit != null)
				return false;
		} else if (!photoEdit.equals(other.photoEdit))
			return false;
		if (producer == null) {
			if (other.producer != null)
				return false;
		} else if (!producer.equals(other.producer))
			return false;
		if (researcher == null) {
			if (other.researcher != null)
				return false;
		} else if (!researcher.equals(other.researcher))
			return false;
		if (showName == null) {
			if (other.showName != null)
				return false;
		} else if (!showName.equals(other.showName))
			return false;
		if (summary == null) {
			if (other.summary != null)
				return false;
		} else if (!summary.equals(other.summary))
			return false;
		return true;
	}
}
